#ifndef TSEGMENT
#define TSEGMENT
#include "WorldObject.h"
#include "Vect3D.h"
#include "iostream"
#include <list>
#include "TranslateNode.h"
#include "GeomBuilder.h"
#include "PerlinNoise.h"

class TerrainSegment: public WorldObject
{
	public:
		TerrainSegment(Vect3D aV, Vect3D bV, Vect3D cV, int s);
		~TerrainSegment();
		Vect3D getA();
		Vect3D getB();
		Vect3D getC();
		virtual SceneRoot* getDrawables(void);
		virtual void update(void);
		virtual int getSize(void);
		virtual Location getLocation(void);
		virtual bool canSplit(void);
		virtual std::list<WorldObject *> split(void);
		virtual bool draw(void);
		virtual void setDraw(bool d);
		virtual bool deleteMe(void);
		virtual void setDelete(bool d);
	private:

		SceneRoot root;
		Location loc;
		bool deleteThis;
		int size;
		Vect3D a, b, c;
		bool drawMe;
		PerlinNoise noise;
};
#endif //TSEGMENT